#include "SConfig.h"
#include <stdio.h>
//#include <sys/types.h>
//#include <sys/stat.h>
//#include <fcntl.h>
int main()
{
	SConfig cfg;

	cfg.ParesFile("/etc/my.cnf");
	char* str;
	if(cfg.GetConfigString("datadir",&str))
	{
		printf("db_name's value is  %s\n",str);
	}
	else
	{
		printf("can't find value!\n");
	}
	int ival;
	
	if(cfg.GetConfigInt("symbolic-links",ival))
	{
		printf("udp_port's value is %d\n",ival);
	}
	else
	{
		printf("can't find value!\n");
	}
	float fval;

	if(cfg.GetConfigFloat("log_mode1",fval))
	{
		printf("log_mode1's value is %f\n",fval);
	}
	else
	{
		printf("can't find value!\n");
	}
	//cfg.delete_conf();
}
